<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Mall_distri_product.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
      :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields"
      :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/mall/Mall_distri_product_second.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      productList: [],
      table: {
        key: "id",
        footer: "Foots",
        cnName: "二级分销商产品发布列表",
        name: "Mall_distri_product_second",
        url: "/Mall_distri_product_second/",
        sortName: "createDate",
      },
      extend: extend,
      editFormFields: {
      },
      editFormOptions: [],
      searchFormFields: {
        productName: "",
        typeCode: ''
      },
      searchFormOptions: [
        [
          { title: "产品名称", field: "productName", type: "like" },
          {
            title: "产品类型",
            field: "typeCode",
            type: "select",
            dataKey: "tree_protype",
          },
        ],
      ],
      columns: [
        {
          field: "id",
          title: "主键",
          type: "string",
          width: 90,
          hidden: true,
          readonly: true,
          require: true,
          align: "left",
        },
        {
          field: "productName",
          title: "产品名称",
          type: "string",
          width: 200,
          align: "left",
        },
        // { field: 'productid', title: '产品名称', type: 'string', bind: { key: 'ProductLists', data: [] }, width: 220, align: 'left', sortable: true },
        {
          field: "distributionid",
          title: "分销商",
          type: "string",
          bind: { key: "distributorList", data: [] },
          width: 220,
          align: "left",
          sortable: true,
        },
        {
          field: "typeName",
          title: "产品类型",
          type: "string",
          bind: { key: "tree_protype", data: [] },
          width: 120,
          align: "left",
        },
        {
          field: "sellingRulesName",
          title: "售卖规则",
          type: "string",
          width: 200,
          align: "left",
        },
        {
          field: "refundrulesName",
          title: "退改规则",
          type: "string",
          width: 200,
          align: "left",
        },
        {
          field: "verificationrulesName",
          title: "核销规则",
          type: "string",
          width: 200,
          align: "left",
        },
        {
          field: "auditStatus",
          title: "审核状态",
          type: "string",
          width: 80,
          bind: { key: "audit", data: [] },
          align: "left",
        },
        {
          field: "serch",
          title: "搜索关键字",
          type: "string",
          bind: { key: "Label", data: [] },
          width: 200,
          align: "left",
        },
        {
          field: "sort",
          title: "排序",
          type: "string",
          width: 100,
          align: "left",
        },
        {
          field: "isPreSale",
          title: "是否预售",
          bind: { key: "enable", data: [] },
          type: "int",
          width: 90,
          align: "left",
          sortable: true,
        },
        //{field:'code',title:'产品编码',type:'string',bind: { key: 'Products', data: [] },width:120,align:'left'},
        //{field:'productid',title:'产品',type:'string',bind: { key: 'ProductLists', data: [] },width:120,align:'left'},
        // { field: 'distributionid', title: '分销商', type: 'string', bind: { key: 'distributorList', data: [] }, width: 220, align: 'left', sortable: true },
        // {field:'supplierid',title:'供应商',bind: { key: 'mall_supplier', data: [] },type:'string',width:120,align:'left',sortable:true},
        //{field:'sellingRulesid',title:'售卖规则',bind: { key: 'mall_sellingrules', data: [] },type:'string',width:120,align:'left'},
        //{field:'refundrulesid',title:'退改规则',bind: { key: 'Mall_refundrules', data: [] },type:'string',width:120,align:'left'},
        //{field:'verificationrulesid',title:'核销规则',bind: { key: 'mall_verificationrules', data: [] },type:'string',width:120,align:'left'},
        {
          field: "effectiveStartDate",
          title: "开始时间",
          type: "datetime",
          width: 220,
          align: "left",
          sortable: true,
        },
        {
          field: "effectiveEndDate",
          title: "结束时间",
          type: "datetime",
          width: 220,
          align: "left",
          sortable: true,
        },
        {
          field: "creator",
          title: "创建人",
          type: "string",
          width: 135,
          align: "left",
        },
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 220,
          align: "left",
          sortable: true,
        },
        {
          field: "modifier",
          title: "修改人",
          type: "string",
          width: 135,
          align: "left",
        },
        // {field:'isSellLikeHot',title:'是否热销',bind: { key: 'enable', data: [] },type:'int',width:135,align:'left',sortable:true},
        {
          field: "modifyDate",
          title: "修改时间",
          type: "datetime",
          width: 220,
          align: "left",
          sortable: true,
        },
        // {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},
        // {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
        // {field:'isAvailable',title:'是否可用',bind: { key: 'enable', data: [] },type:'int',width:90,align:'left'},
      ],
      detail: {
        cnName: "发布商品 ",
        columns: [
          {
            field: "id",
            title: "主键",
            type: "string",
            width: 90,
            hidden: true,
            readonly: true,
            require: true,
            align: "left",
          },
          {
            field: "spare2",
            title: "商品编码",
            type: "string",
            width: 150,
            align: "left",
            fixed: "left",
          },
          {
            field: "spare1",
            title: "商品名称",
            type: "string",
            width: 150,
            edit: { type: "text" },
            align: "left",
            fixed: "left",
          },
          {
            field: "sellingPrice",
            title: "门市价",
            type: "string",
            width: 100,
            edit: { type: "decimal" },
            align: "left",
          },
          {
            field: "preferentialPrice",
            title: "售价",
            type: "string",
            width: 90,
            edit: { type: "decimal" },
            min: 0,
            align: "left",
          },
          // {
          //   field: "vipPrice",
          //   title: "会员价",
          //   type: "string",
          //   width: 90,
          //   edit: { type: "decimal" },
          //   min: 0,
          //   align: "left",
          // },
          {
            field: "settlementPrice",
            title: "结算价",
            type: "string",
            width: 90,
            edit: { type: "decimal" },
            min: 0,
            align: "left",
          },
          // {
          //   field: "channelPrice",
          //   title: "渠道价",
          //   type: "string",
          //   width: 90,
          //   edit: { type: "decimal" },
          //   min: 0,
          //   align: "left",
          // },
          {
            field: "isAvailable",
            title: "是否可用",
            type: "int",
            edit: { type: "switch" },
            width: 90,
            align: "left",
          },
          {
            field: "spare6",
            title: "会员价json",
            type: "string",
            width: 90,
            align: "left",
            hidden: true,
          },
        ],
        sortName: "id",
        key: "id",
      },
    };
  },
};
export default vueParam;
</script>
